package com.zhdl.common.ytools.springContext;

import org.springframework.context.support.ApplicationObjectSupport;
import org.springframework.stereotype.Component;

import java.util.Objects;

@Component
public class SpringContextHolder extends ApplicationObjectSupport {
    public CommonParmaOpt getOpt(String name) {
        return Objects.requireNonNull(getApplicationContext()).getBean(name, CommonParmaOpt.class);
    }
}
